package com.hecn.mapper;

import com.hecn.pojo.User;
import lombok.Setter;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/** @author 24497 */
public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {
  /** @return */
  public List<User> selectUser() {
    return getSqlSession().getMapper(UserMapper.class).selectUser();
  }

  public int addUser(User user) {
    return getSqlSession().getMapper(UserMapper.class).addUser(user);
    //        sqlSession.commit();
    //        sqlSession.close();
  }

  public int deleteUser(int id) {
    return getSqlSession().getMapper(UserMapper.class).deleteUser(id);
  }
}
